package com.wn.ziroom.vo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

import java.util.Date;


@Document(indexName = "room")
@Setting(shards = 3,replicas = 1)
@Data
public class EsRoomVo {

   @Id
    private Integer id;

    @Field(type = FieldType.Double,index = true,store = true )
    private Integer rent;
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String name;

    @Field(type = FieldType.Integer,index = true,store = true)
    private Integer type;

    @Field()
    private String build;

    @Field(type = FieldType.Keyword,index = true,store = true)
    private Integer StreetCode;

    @Field(type = FieldType.Date,index = true,store = true)
    private Date endTime;

//    @Field(type = FieldType.Keyword,index = true,store = true)
//    private String heating;

    @Field(type = FieldType.Text,index = false,store = false)
    private String img;

    @Field(type = FieldType.Double,index = true,store = true)
    private Double area;

    @Field(type = FieldType.Keyword,index = true,store = true)
    private String direction;


    private String roomType;
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String position;

}
